package com.xinzi.apartment.common.exception;

/**
 * 统一异常状态码
 */
public enum BizCodeEnum {

    NO_AUTHORIZATION(10001, "没有权限操作，请联系管理员开放权限"),
    NO_ENOUGH_DORMITORY(10002, "寝室数量不够分配"),
    INVALID_PARAM(10003, "参数不合法"),
    ALREADY_IN_DB(10004, "数据库中已存在该记录"),
    PATH_NOT_FOUND(10005, "路径不存在，请检查路径是否正确"),
    UNKNOWN_EXCEPTION(10006, "未知异常，请联系开发人员处理");

    private Integer code;
    private String message;

    BizCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
